<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@include file="header.jsp"%>
<%@ page import="MyServlet.Candidate2"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<br>
<br>

<h2>Delete or update candidates</h2>
<br>
<br>
	<div id="myDiv2">
	
		<c:if test="${!empty candidateList }">
			<c:forEach items="${candidateList}" var="candidate">
				<div style="padding: 2em 6em;">
				<form action="/Assignment3/updatecandidate/${candidate.id}"  method="POST">
					<table>
					<tr>
						<td><a href="/Assignment3/deletecandidate/${candidate.id}"><button> Delete </a></button> </td>
						<td>
							<table>
							<tr><td>First name: ${candidate.firstName}</td></tr>
							<tr><td>Last name: ${candidate.lastName}</td></tr>
							<tr><td>Email: ${candidate.email}</td></tr>
							<tr><td>Mobile: ${candidate.mobileNo}</td></tr>
							<tr><td>Telephone: ${candidate.telephoneNo}</td></tr>
							<tr><td>Interview: ${candidate.interviews}</td></tr>
							<tr><td>Comments: ${candidate.comments}</td></tr>
							
							</table>
						</td>
						<td><img src="images/user.jpg" height="150" width="250"></td>
						<td>
							<table>
				
							<tr><td>First name: ${candidate.firstName}</td><td><input class="inputtext" type="text" name="firstname"/></td></tr>
							<tr><td>Last name: ${candidate.lastName}</td><td><input class="inputtext" type="text" name="lastname"/></td></tr>
							<tr><td>Email: ${candidate.email}</td><td><input class="inputtext" type="text" name="email"/></td></tr>
							<tr><td>Mobile: ${candidate.mobileNo}</td><td><input class="inputtext" type="text" name="mobileno"/></td></tr>
							<tr><td>Telephone: ${candidate.telephoneNo}</td><td><input class="inputtext" type="text" name="telephone"/></td></tr>
							<tr><td>Interview: ${candidate.interviews}</td><td><input class="inputtext" type="text" name="interview"/></td></tr>
							<tr><td>Comments: ${candidate.comments}</td><td><input class="inputtext" type="text" name="comments"/></td></tr>
							</table>
							
						</td>
						<td><input type="submit" tabindex="4" value="Update"/></td>
					</tr>
					</table>
					</form>
				</div>
			</c:forEach>
		</c:if>
		</div>
</body>
</html>